package com.zb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/10/7 0007
 **/
@Data
@ApiModel("结单/回访模板对象")
public class WorkStatementTemplateVo {
    @ApiModelProperty(value = "结单模板ID，新增不必传，修改必传")
    private Long id;

    @NotBlank(message = "结单模板名称不能为空")
    @Length(max = 10, message = "结单模板名称长度限制 10 个字符以内")
    @ApiModelProperty(value = "模板名称", required = true)
    private String name;

    @NotNull(message = "结单模板状态不能为空")
    @ApiModelProperty(value = "结单模板状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;

    @ApiModelProperty(value = "应用模块ID")
    private List<TemplateModuleVo> templateModuleIds;

    @ApiModelProperty(value = "删除的应用模块ID")
    private List<Long> delTemplateModuleIds;

    @Valid
    @NotNull(message = "模板字段不能为空")
    @NotEmpty(message = "模板字段至少要填写一项")
    @ApiModelProperty("模板字段对象")
    private List<WorkStatementTemplateFieldVo> templateField;

}
